import Vue from 'vue'
import axios from 'axios'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
// import PublicUI from '@/public-components'
// import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/element/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n

import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control
import api from '@/api/dong'
import '@/filter/index'

// import dayjs from 'dayjs'

import consts from './consts'

import tools from '@/utils/tools'


import szlschiefdata from 'szlschiefdata'
Vue.use(szlschiefdata.vueComponentPlugin)

import {resetForm} from '@/utils/badao'
Vue.prototype.resetForm = resetForm

// 开发环境
console.log(process.env.NODE_ENV)
if (process.env.NODE_ENV === 'production') {
  const { mockXHR } = require('../mock')
  mockXHR()
}
import AmapVueConfig from '@amap/amap-vue/lib/config'
// 高德Key
AmapVueConfig.key = '25c2d7b46a0cf0df31cf625275f0d18d'
AmapVueConfig.plugins = ['AMap.MoveAnimation', 'AMap.Walking']

// set ElementUI lang to EN
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
Vue.use(ElementUI)
// Vue.use(PublicUI)
Vue.prototype.$api = api
Vue.config.productionTip = false
// 解决不需要token的交互
Vue.prototype.$axios = axios

Vue.prototype.$consts = consts

Vue.prototype.$tools = tools


// 注册自定义插件
import Plugins from './plugin/index'
Vue.use(Plugins)

import CustomButton from '@/components/custom-button/index'
Vue.component('custom-button', CustomButton)

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App),
})
